package org.yray.sip.constant;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 是或否标记枚举
 */
public enum SessionStatusEnum {
    CALL_ING(0, "外呼中"),
    ANSWER(1, "客户应答"),
    TO_MAN_ING(2, "正在转接中"),
    TO_MAN_RING(6, "转人工分机震铃"),
    TO_MAN_SUCC(3, "转人工成功"),
    CLOSE(4, "关闭"),
    ;

    private Integer value;
    private String displayName;

    SessionStatusEnum(Integer value , String displayName){
        this.value = value;
        this.displayName = displayName;
    }


    public Integer getValue() {
        return this.value;
    }


    public String getDisplayName() {
        return this.displayName;
    }


    public static SessionStatusEnum getEnum(Integer value) {
        return enumMap.get(value);
    }

    private static Map<Integer, SessionStatusEnum> enumMap = new HashMap<Integer, SessionStatusEnum>();

    static {
        for (SessionStatusEnum en : SessionStatusEnum.values()) {
            enumMap.put(en.getValue(), en);
        }
    }

}
